*Analysis run using Stata 18

clear
use "C:\Users\Desktop\madman R&R\replication_master_data.dta"
* Table 1. Descriptive Statistics
sum  madness_score madman_leader sanctionsuccessnew multi lagged_cinc1 democracy_lag  gdp_change_l1 recentMIDs_byleader   sanctionissue 
*Table 2. Regime Type, Madman Leaders, and Sanction Success Distribution
* first row: sanction success
tab regime1 sanctionsuccessnew
*second row: number of madman leader  *As I noted in footnote 7 "The number in the box represents the unique number of leaders in each regime type."
tab  leader regime1 if madman_leader==1
*third row: average madness score for madman leaders
bysort regime1: summarize madness_score if madman_leader == 1

*Table 3. Logit results with unmatched and matched samples. 
*Model 1: logit model
logit sanctionsuccessnew madness_score democracy_lag recentMIDs_byleader lagged_cinc1 multi sanctionissue  gdp_change_l1, robust cluster (ccode)

*model 2: logit model 
logit sanctionsuccessnew madman_leader democracy_lag recentMIDs_byleader lagged_cinc1  multi  sanctionissue gdp_change_l1  , robust cluster (ccode)

*model 3: CEM 
imb democracy_lag recentMIDs_byleader , treatment (madman_leader)
cem democracy_lag recentMIDs_byleader , treatment (madman_leader)
logit sanctionsuccessnew madman_leader democracy_lag recentMIDs_byleader lagged_cinc1 multi    sanctionissue gdp_change_l1 [iweight=cem_weights], robust cluster (ccode)

*Figure 1. Marginal Effects of Reputation for Madness on Sanction Success Between Leaders with and without a Reputation for Madness
margins, at(madman_leader=(0  1)) atmeans force
marginsplot, title("The Effect of Madness Reputation on Sanction Success") ylabel() ytitle(pr(Sanction Success=1)) xtitle(Madman Leader) graphregion(color(white)) legend(label(1 "0 = leaders without madness reputation") label(2 "1 = Madman leaders"))

*Table A1. Madman Leaders in EUSANCT from 1989-2012
list leader year country politicalregime sanctionsuccessnew madness_score if madman_leader==1
*Table A2. Regime Type, Madman Leaders, and Sanction Success Distribution in EUSANCT from 1989-2012
* first row: sanction success
tab politicalregime sanctionsuccessnew
*second row: number of madman leader  *As I noted in footnote 7 "The number in the box represents the unique number of leaders in each regime type."
tab  leader politicalregime if madman_leader==1
*third row: average madness score for madman leaders
bysort politicalregime: summarize madness_score if madman_leader == 1

*Table A3. List of the Main Matches for Each Treatment Unit
sort cem_strata 
list year country leader madman_leader cem_strata if cem_matched == 1, sepby(cem_strata)

*Table A4. Covariate after CEM Matching
sum democracy_lag recentMIDs_byleader lagged_cinc1 multi    sanctionissue gdp_change_l1 [aw=cem_weights] if madman_leader == 1
sum democracy_lag recentMIDs_byleader lagged_cinc1 multi    sanctionissue gdp_change_l1 [aw=cem_weights] if madman_leader == 0

*Table A5. Logit Model without Saddam Hussein Observation
drop if leader=="Saddam Hussein" & year==1991
logit sanctionsuccessnew madness_score democracy_lag recentMIDs_byleader lagged_cinc1 multi sanctionissue  gdp_change_l1, robust cluster (ccode)

*Robustness checks
clear
use "C:\Users\Desktop\madman R&R\replication_robustnesscheck_data.dta"
*Table A6. Regime Type, Madman Leaders, and Sanction Success Distribution in GSDB from 1985-2015
* first row: sanction success
tab politicalregime sanction_success
*second row: number of madman leader  *As I noted in footnote 7 "The number in the box represents the unique number of leaders in each regime type."
tab  leader politicalregime if madman_leader==1
*third row: average madness score for madman leaders
bysort politicalregime: summarize madness_score if madman_leader == 1

*Table 7. Madman Leaders and Sanction Success with GSDB sample
*Model 1: Logit model 
logit sanction_success madness_score politicalregime recentMIDs_byleader  polconiii  lagged_gdp arms lagged_cinc1

*Model 2: CEM model 
imb politicalregime  recentMIDs_byleader, treatment( madman_leader )
cem politicalregime  recentMIDs_byleader, treatment( madman_leader )
logit sanction_success madman_leader politicalregime recentMIDs_byleader  polconiii  lagged_gdp arms lagged_cinc1 [iweight=cem_weights]

*Figure 2. Marginal Effects of Reputation for Madness on Sanction Success Between Leaders with and without a Madness Reputation for Madness
margins, at(madman_leader=(0  1)) atmeans force
marginsplot, title("The Effect of Madness Reputation on Sanction Success") ylabel() ytitle(pr(Sanction Success=1)) xtitle(Madman Leader) graphregion(color(white)) legend(label(1 "0 = leaders without madness reputation") label(2 "1 = Madman leaders"))







